package com.ahdy.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.boot.ApplicationRunner;

/**
 * MyBatis-Plus配置类
 */
@Configuration
public class MybatisPlusConfig {

    /**
     * 提供一个空的ApplicationRunner Bean
     * 这样可以防止MyBatis-Plus自动创建ddlApplicationRunner
     */
    @Bean
    @Primary
    public ApplicationRunner customDdlApplicationRunner() {
        return args -> {
            // 空实现，不执行任何DDL操作
        };
    }
} 